package com.foreknow.example3;

public abstract class Animal {
    private String name; //名字
    private int legNum;//腿

    public Animal(String name,int legNum) {
        this.name = name;
        this.legNum = legNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLegNum() {
        return legNum;
    }

    public void setLegNum(int legNum) {
        this.legNum = legNum;
    }

    public abstract void shout();
}
